#pragma once
#include "Player.h"

enum ChaserMode
{
	CHASE_MODE_RANDOM,
	CHASE_MODE_MOVE_TO,
	CHASE_MODE_TARGET,
};

class Chaser: public Player
{
	private:
		int nCurrentSteps; // number of steps to move
		bool bMoveFoward; // to move foward or to move backward

		int nCurrentTurnSteps; // number of steps for turning, should be much smaller than nCurrentStep
		bool bTurnLeft; // to turn left or right

		ChaserMode chaseMode;
		D3DXVECTOR3 moveDirection;
		D3DXVECTOR3 targetPos;
		
	public:
		Chaser(void);
		~Chaser(void);
		void update(D3DXVECTOR3 target, long time);
		void setMode(ChaserMode mode);
		ChaserMode getMode() { return chaseMode; }
		const D3DXVECTOR3 getMoveDirection() { return moveDirection; }
		void setDirection(float x, float y, float z);

		float searchRadius; // when the player is within the radius, run towards the player
};